package com.aoip.telemetry.telemetry.core.exception;

import com.aoip.telemetry.telemetry.entity.enums.MsgCodecStatusEnum;

/**
 * @author chenbai
 * @version 1.0
 * @date 2021/8/13 16:59
 */
public class MsgCodecException extends RuntimeException {

    private static final long serialVersionUID = -4392645527525298571L;
    private MsgCodecStatusEnum exceptionEnum;

    public MsgCodecStatusEnum getExceptionEnum() {
        return exceptionEnum;
    }

    public MsgCodecException(MsgCodecStatusEnum exceptionEnum, String msg) {
        super(msg);
        this.exceptionEnum = exceptionEnum;
    }

    public MsgCodecException(MsgCodecStatusEnum exceptionEnum, Throwable cause) {
        super(cause);
        this.exceptionEnum = exceptionEnum;
    }

    public MsgCodecException(MsgCodecStatusEnum exceptionEnum) {
        super(exceptionEnum.getMsg());
        this.exceptionEnum = exceptionEnum;
    }


}
